package com.txzt.gaea.common.enums;

public enum CostType {

    /**
     * 设备费
     */
    DEVICE("device","设备费"),

    /**
     * 材料费
     */
    MATERIAL("material","材料费"),

    /**
     * 外部协作费
     */
    COOPERATION("cooperation","外部协作费"),

    /**
     * 燃料动力费
     */
    FUEL("fuel","燃料动力费"),

    /**
     * 会议/差旅/国际合作与交流费
     */
    TTI("tti","会议/差旅/国际合作与交流费"),

    /**
     * 出版/文献/信息传播/知识产权事务费
     */
    PDII("pdii","出版/文献/信息传播/知识产权事务费"),

    /**
     * 劳务费
     */
    LABOR("labor","劳务费"),
    /**
     * 专家费
     */
    EXPERT("expert","专家费"),
    /**
     * 其他费
     */
    other("other","其他费"),
    /**
     * 间接费
     */
    INDIRECT("indirect","间接费"),
    ;

    private final String code;

    private final String info;

    CostType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(String code){
        CostType[] statuses = values();
        for (CostType status:statuses){
            if (status.getCode().equals(code)) {
                return status.getInfo();
            }
        }
        return "";
    }
}
